<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%-- 包含 --%>
<%@ include file="/common/include/page.jsp"%>
<form id="pagerForm" method="post" action="demo_page1.html">
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" />
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="${model.numPerPage}" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
</form>


<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="${rootPath }/back/admins/adminsList.htm" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					关键字：<input type="text" name="keyword" value="${requestScope.keyword }"/>
				</td>
				<td>
					状态：
					<select name="status" class="textInput">
						<option value="">请选择</option>
						<option value="1" ${requestScope.status=='1'?'selected=selected':'' }>启用</option>
						<option value="0" ${requestScope.status=='0'?'selected=selected':'' }>禁用</option>
					</select>
				</td>
				<td>
					创建时间：<input type="text" class="date" readonly="true" name="st" value="${requestScope.st }" datefmt="yyyy-MM-dd HH:mm:ss" />
					-->
					<input type="text" class="date" readonly="true" name="ed" value="${requestScope.ed }" datefmt="yyyy-MM-dd HH:mm:ss" />
				</td>
			</tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				<li><a class="button" href="#" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="demo_page4.html" target="navTab"><span>添加</span></a></li>
			<li><a class="delete" href="demo/common/ajaxDone.html?uid={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
			<li>
				<!-- 
					sid_user:指的是tr上面的target:sid_user,值是rel
				-->
				<a class="edit" href="${rootPath }/back/admins/adminsUpdate.htm?operType=udateInfo&aid={sid_user}" 
					target="navTab" rel="adminsUdateInfo">
					<span>修改</span>
				</a>											
			</li>
			<li>
				<!-- 
					sid_user:指的是tr上面的target:sid_user,值是rel
				-->
				<a class="edit" href="${rootPath }/back/admins/adminsUpdate.htm?operType=udatePass&aid={sid_user}" 
					target="navTab" rel="adminsUdatePass">
					<span>密码修改</span>
				</a>
			</li>
			<li>
				<!-- 
					sid_user:指的是tr上面的target:sid_user,值是rel
				-->
				<a class="edit" href="${rootPath }/back/admins/adminsUpdate.htm?operType=resetPass&aid={sid_user}" 
					target="navTab" rel="adminsResetPass">
					<span>密码重置</span>
				</a>
			</li>
			<li class="line">line</li>
			<li><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="30">序号</th>
				<th width="30">id</th>
				<th width="40">角色</th>
				<th width="100">邮箱</th>
				<th width="50">名称</th>
				<th width="50">性别</th>
				<th width="50">状态</th>
				<th width="80">手机</th>
				<th width="80">QQ</th>
				<th width="150">创建时间</th>
				<th width="150">更新时间</th>
				<th width="150">上次登录时间</th>
			</tr>
		</thead>
		<tbody>
			<!--
				每一行都有一个rel，不能重复
			-->
			<c:forEach items="${requestScope.adminsList}" var="admins" varStatus="stat">
				<tr target="sid_user" rel="${admins.id }">
					<td>${stat.count}</td>
					<td>${admins.id}</td>
					<td>${admins.role.name}</td>
					<td>${admins.email}</td>
					<td>${admins.name}</td>
					<td>
						<c:if test="${admins.sex =='0'}">未知</c:if>
						<c:if test="${admins.sex =='1'}">男</c:if>
						<c:if test="${admins.sex =='2'}">女</c:if>
						<%-- ${admins.sex} --%>
					</td>
					<td>${admins.statusStr}</td>
					<td>${admins.phone}</td>
					<td>${admins.qq}</td>
					<td><fmt:formatDate value="${admins.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
					<td><fmt:formatDate value="${admins.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
					<td><fmt:formatDate value="${admins.lastLoginTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<%-- <div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span>条，共${totalCount}条</span>
		</div>

		<div class="pagination" targetType="navTab" totalCount="200" numPerPage="20" pageNumShown="10" currentPage="1"></div>

	</div> --%>
	
	<!-- 
		id:为选项卡的rel+当前选项卡的id
	 -->
	<form action="${rootPath }/back/admins/adminsList.htm" method="post" id="adminsListPageForm" onsubmit="return navTabSearch(this);">
		<input type="hidden" name="keyword" value="${requestScope.keyword }">
		<input type="hidden" name="status" value="${requestScope.status }">
		<input type="hidden" name="st" value="${requestScope.st }">
		<input type="hidden" name="ed" value="${requestScope.ed }">
		
		<div class="panelBar">
			<div class="pages">
				<a class="button" href="" onclick="return pageForm('adminsListPageForm', 'adminsListCurrentPage', '1', 'adminsListPageSize','${requestScope.pageInfoUtil.pageSize}')"><span>首页</span>&nbsp;&nbsp;&nbsp;</a>
				<a class="button" href="" onclick="return pageForm('adminsListPageForm', 'adminsListCurrentPage', '${requestScope.pageInfoUtil.prePage}', 'adminsListPageSize','${requestScope.pageInfoUtil.pageSize}')"><span>上一页</span>&nbsp;&nbsp;&nbsp;</a>
				<a class="button" href="" onclick="return pageForm('adminsListPageForm', 'adminsListCurrentPage', '${requestScope.pageInfoUtil.nextPage}', 'adminsListPageSize','${requestScope.pageInfoUtil.pageSize}')"><span>下一页</span>&nbsp;&nbsp;&nbsp;</a>
				<a class="button" href="" onclick="return pageForm('adminsListPageForm', 'adminsListCurrentPage', '${requestScope.pageInfoUtil.totalPage}', 'adminsListPageSize','${requestScope.pageInfoUtil.pageSize}')"><span>尾页</span>&nbsp;&nbsp;&nbsp;</a>
				共${requestScope.pageInfoUtil.totalPage}页/共${requestScope.pageInfoUtil.totalRecord }条&nbsp;&nbsp;&nbsp;	
				第<input type="text" id="adminsListCurrentPage" name="currentPage" value="${requestScope.pageInfoUtil.currentPage}" size="5" maxlength="5">页&nbsp;&nbsp;&nbsp;
				第<input type="text" id="adminsListPageSize"  name="pageSize" value="${requestScope.pageInfoUtil.pageSize}" size="5" maxlength="5">条&nbsp;&nbsp;&nbsp;
				<input type="submit" value="GO">
			</div>
		</div>
	</form>
</div>
